package team.seekers.oj.homework.dto;

import lombok.*;
import org.hibernate.validator.constraints.Length;
import team.seekers.oj.common.entity.BaseDTO;
import team.seekers.oj.contest.dto.ContestFeatureDTO;
import team.seekers.oj.contest.dto.ContestProblemManageListDTO;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class HomeworkCreateReqDTO extends BaseDTO {

    @Length(max = 60, message = "标题最大长度为 60")
    @NotBlank
    private String title;

    private Long userId;

    private Long courseId;

    private Date gmtStart;

    private Date gmtEnd;

    private String description;

    @Size(max = 1024, message = "题目数量过多")
    private List<HomeworkProblemListDTO> problems;                    // List<p_id>

    @Size(max = 1024, message = "群组过多")
    private List<Long> participantGroups;           // List<g_id>

}